<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!--sweetalert2-->
    <link href="./sweetalert2/dist/sweetalert2.min.css" rel="stylesheet">
    <script src="./sweetalert2/dist/sweetalert2.min.js" type="text/javascript"></script>
</head>
<body>


<script>

//输入密码弹窗

    async  function fn(){
        const { value: password } = await Swal.fire({
            title: 'Enter your password',
            input: 'password',
            inputLabel: 'Password',
            inputPlaceholder: 'Enter your password',
            inputAttributes: {
                maxlength: 10,
                autocapitalize: 'off',
                autocorrect: 'off'
            }
        })

        if (password) {
            Swal.fire(`Entered password: ${password}`)
        }
    }


    fn()
</script>
</body>
</html>